package com.w3coffee.web.control;

import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.servlet.ModelAndView;

public class CheckoutController extends BaseController {

	@Override
	public ModelAndView handleRequest(HttpServletRequest req,
			HttpServletResponse resp) throws Exception {
		req.getSession().removeAttribute("TOKEN");
		Cookie cookie = new Cookie("TOKEN", "null");
		resp.addCookie(cookie);
		
		return adaptive(req, resp, "welcome", getDefaultModel(req));
	}

}
